home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
prog
/
fordo101.arj
/
FORDO.C
next >
Wrap
C/C++ Source or Header
|
1993-12-13
|
1KB
|
55 lines
/* Compile me with Turbo C */
#include <string.h>
#include <dos.h>
#include <process.h>
char msg1[] = "FORDO V1.01 - Tony Ingenoso\r\n\r\n"
"Note: '%%i' is the name of replaceable parm in DO part\r\n\r\n"
"Enter FOR specs :$";
char msg2[] = "Enter thing to DO:$";
char msg3[] = "\r\n$";
void main(void)
{
static unsigned char specs[120] = {115};
static unsigned char what[120] = {115};
static unsigned char cmd[180] = " COMMAND /C FOR %i IN ( ";
_DX = &msg1[0];
_AH = 9;
geninterrupt(0x21);
_DX = &specs[0];
_AL = 119;
_AH = 0x0A;
geninterrupt(0x21);
_DX = &msg3[0];
_AH = 9;
geninterrupt(0x21);
_DX = &msg2[0];
_AH = 9;
geninterrupt(0x21);
_DX = &what[0];
_AL = 119;
_AH = 0x0A;
geninterrupt(0x21);
_DX = &msg3[0];
_AH = 9;
geninterrupt(0x21);
specs[specs[1] + 2] = 0;
what [what [1] + 2] = 0;
strcat(cmd, specs+2);
strcat(cmd, " ) DO ");
strcat(cmd, what+2);
strcat(cmd, "\r\n");
system(cmd);
}